require 'hkmule.rb'

l = open('hk.txt','r').readlines
out = open('hk2.txt','w')
l.each{|line|
	s = line.chop.split ':'
	if s.length > 2
		out.print line
		next
	end
=begin
	if s[1]!='neterr'
		out.print line
		next
	end
=end
	cname=s[0]
	
	print "\n",cname
	g = hkmule_utf8(cname).join(',')

	out.print(cname,':',g)
	out.print "\n"
	print ' neterr' if g=='neterr'
	print ' empty' if g=='empty'
}
